package testServer;

import java.sql.SQLException;

public class Actions {
	
	static DBConnection condb;
	
	public static String login(String benutzer, String password){
		
		condb = new DBConnection();
		String answer = "";
		try {
			condb.rs = condb.s.executeQuery("select USERNAME, PASSWORD from USER where USER.USERNAME = '" + benutzer + 
					"' and USER.PASSWORD = '" +  password + "'");
			while (condb.rs.next()){
				answer = "right";
			}
		}
		catch (SQLException e) {
			e.printStackTrace();
			System.out.println(e);
		}
		
		return answer;
	}
	
	
	
}
